package homework;

import java.util.Random;

public class homework08 {
	public static void main(String[] args) {
		int[] arr={1,2,3,4,5};
		Random r = new Random();
		int number = r.nextInt(arr.length);
		for(int i=0;i<arr.length;i++){
			int temp=arr[0];
			arr[0]=arr[number];
			arr[number]=temp;
		}
		for(int i=0;i<arr.length;i++){
			System.out.println(arr[i]);
		}
		System.out.println(number);
	}
}
